#include <iostream>
using namespace std;
// 待解决的问题：高精度问题
int n;
long long hanoi[15005];

int main() {
    cin >> n;
    hanoi[1] = 1;
    for (int i = 2; i <= n; i++) { hanoi[i] = 2 * hanoi[i - 1] + 1; }
    cout << hanoi[n] << endl;
    return 0;
}